Add some example config files that can be used with the URW fonts.
authorAlexander Larsson <alexl@redhat.com>
Thu, 14 Jun 2001 18:10:01 +0000 (18:10 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Thu, 14 Jun 2001 18:10:01 +0000 (18:10 +0000)
2001-06-14  Alexander Larsson  <alexl@redhat.com>

        * docs/README.linux-fb:
Add some example config files that can be used with the URW fonts.

* gdk/linux-fb/gdkvisual-fb.c (gdk_visual_init):
Set up the color ramps for DirectColor mode.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/README.linux-fb
gdk/linux-fb/gdkvisual-fb.c

index f9fe442c10203f0c4ca5f6207f6e46969e6ca90b..8508039a85cac312e778d5ac2282f4a6d1153dfc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-06-14  Alexander Larsson  <alexl@redhat.com>
+
+        * docs/README.linux-fb:
+       Add some example config files that can be used with the URW fonts.
+       
+       * gdk/linux-fb/gdkvisual-fb.c (gdk_visual_init): 
+       Set up the color ramps for DirectColor mode.
+
 2001-06-11  Havoc Pennington  <hp@redhat.com>
 
        * Release 1.3.6
index f9fe442c10203f0c4ca5f6207f6e46969e6ca90b..8508039a85cac312e778d5ac2282f4a6d1153dfc 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-14  Alexander Larsson  <alexl@redhat.com>
+
+        * docs/README.linux-fb:
+       Add some example config files that can be used with the URW fonts.
+       
+       * gdk/linux-fb/gdkvisual-fb.c (gdk_visual_init): 
+       Set up the color ramps for DirectColor mode.
+
 2001-06-11  Havoc Pennington  <hp@redhat.com>
 
        * Release 1.3.6
index f9fe442c10203f0c4ca5f6207f6e46969e6ca90b..8508039a85cac312e778d5ac2282f4a6d1153dfc 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-14  Alexander Larsson  <alexl@redhat.com>
+
+        * docs/README.linux-fb:
+       Add some example config files that can be used with the URW fonts.
+       
+       * gdk/linux-fb/gdkvisual-fb.c (gdk_visual_init): 
+       Set up the color ramps for DirectColor mode.
+
 2001-06-11  Havoc Pennington  <hp@redhat.com>
 
        * Release 1.3.6
index f9fe442c10203f0c4ca5f6207f6e46969e6ca90b..8508039a85cac312e778d5ac2282f4a6d1153dfc 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-14  Alexander Larsson  <alexl@redhat.com>
+
+        * docs/README.linux-fb:
+       Add some example config files that can be used with the URW fonts.
+       
+       * gdk/linux-fb/gdkvisual-fb.c (gdk_visual_init): 
+       Set up the color ramps for DirectColor mode.
+
 2001-06-11  Havoc Pennington  <hp@redhat.com>
 
        * Release 1.3.6
index f9fe442c10203f0c4ca5f6207f6e46969e6ca90b..8508039a85cac312e778d5ac2282f4a6d1153dfc 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-14  Alexander Larsson  <alexl@redhat.com>
+
+        * docs/README.linux-fb:
+       Add some example config files that can be used with the URW fonts.
+       
+       * gdk/linux-fb/gdkvisual-fb.c (gdk_visual_init): 
+       Set up the color ramps for DirectColor mode.
+
 2001-06-11  Havoc Pennington  <hp@redhat.com>
 
        * Release 1.3.6
index f9fe442c10203f0c4ca5f6207f6e46969e6ca90b..8508039a85cac312e778d5ac2282f4a6d1153dfc 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-14  Alexander Larsson  <alexl@redhat.com>
+
+        * docs/README.linux-fb:
+       Add some example config files that can be used with the URW fonts.
+       
+       * gdk/linux-fb/gdkvisual-fb.c (gdk_visual_init): 
+       Set up the color ramps for DirectColor mode.
+
 2001-06-11  Havoc Pennington  <hp@redhat.com>
 
        * Release 1.3.6
index f9fe442c10203f0c4ca5f6207f6e46969e6ca90b..8508039a85cac312e778d5ac2282f4a6d1153dfc 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-14  Alexander Larsson  <alexl@redhat.com>
+
+        * docs/README.linux-fb:
+       Add some example config files that can be used with the URW fonts.
+       
+       * gdk/linux-fb/gdkvisual-fb.c (gdk_visual_init): 
+       Set up the color ramps for DirectColor mode.
+
 2001-06-11  Havoc Pennington  <hp@redhat.com>
 
        * Release 1.3.6
index 049e11ff0e56afedc062c857d3dd4c0a7b268ad9..b704b03644a9ac05f15cd7198f04ff1e36a05fbc 100644 (file)
@@ -44,7 +44,7 @@ it looks in $prefix/lib/ft2fonts, and if you want to change this you
 must add something like:
 
 [PangoFT2]
-FontPath = /usr/share/fonts/default/TrueType
+FontPath = /usr/share/fonts/default/Type1:/usr/share/fonts/default/TrueType
 
 To your $prefix/etc/pango/pangorc or ~/.pangorc.
 
@@ -53,7 +53,12 @@ This is done by creating a $prefix/etc/pango/pangoft2.aliases or
 ~/.pangoft2_aliases file. You can also set the name of this file using the
 key AliasFiles in the PangoFT2 section in pangorc.
 
-An example of a font alias file is:
+An example of a font alias file for the urw fontset is:
+sans normal normal normal normal "urw gothic l"
+serif normal normal normal normal "urw palladio l"
+monospace normal normal normal normal "nimbus mono l"
+
+And one using the Windows truetype fonts is:
 sans normal normal normal normal "arial"
 serif normal normal normal normal "times new roman"
 monospace normal normal normal normal "courier new"
index 4ac5d3c82df3c292ab763ed1e0e32dddce7c5a3f..d593d21f51ffb4a40d97ae13b91aa974c246e220 100644 (file)
@@ -27,6 +27,7 @@
 #include "gdkvisual.h"
 #include "gdkprivate-fb.h"
 #include "gdkinternals.h"
+#include <sys/ioctl.h>
 
 static GdkVisual *system_visual = NULL;
 
@@ -46,10 +47,6 @@ gdk_visual_init (void)
       system_visual->type = GDK_VISUAL_PSEUDO_COLOR;
       break;
     case FB_VISUAL_DIRECTCOLOR:
-      /* TODO: Should load the colormap to ramps here, as they might be initialized to
-        some other garbage */
-      
-      /* Fall through */
     case FB_VISUAL_TRUECOLOR:
       system_visual->type = GDK_VISUAL_TRUE_COLOR;
 
@@ -64,6 +61,35 @@ gdk_visual_init (void)
       system_visual->blue_prec = gdk_display->modeinfo.blue.length;
       system_visual->blue_shift = gdk_display->modeinfo.blue.offset;
       system_visual->blue_mask = ((1 << (system_visual->blue_prec)) - 1) << system_visual->blue_shift;
+
+      if (gdk_display->sinfo.visual == FB_VISUAL_DIRECTCOLOR) 
+       {
+         guint16 red[256], green[256], blue[256];
+         struct fb_cmap fbc = {0,0};
+         int size, i;
+         /* Load the colormap to ramps here, as they might be initialized to
+            some other garbage */
+         
+         g_warning ("Directcolor visual, not very well tested\n");
+         fbc.red = red;
+         fbc.green = green;
+         fbc.blue = blue;
+         
+         size = 1 << system_visual->red_prec;
+         for (i = 0; i < size; i++)
+           red[i] = i * 65535 / (size - 1);
+         
+         size = 1 << system_visual->green_prec;
+         fbc.len = size;
+         for (i = 0; i < size; i++)
+           green[i] = i * 65535 / (size - 1);
+         
+         size = 1 << system_visual->blue_prec;
+         for (i = 0; i < size; i++)
+           blue[i] = i * 65535 / (size - 1);
+         
+         ioctl (gdk_display->fb_fd, FBIOPUTCMAP, &fbc);
+       }
       break;
     case FB_VISUAL_STATIC_PSEUDOCOLOR:
       system_visual->type = GDK_VISUAL_STATIC_COLOR;